package com.school.campus.domain;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.school.common.annotation.Excel;
import com.school.common.core.domain.BaseEntity;

/**
 * 帖子对象 post
 *
 * @author wwj
 * @date 2025-11-03
 */
public class Post extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID，自增
     */
    private Long id;

    /**
     * 发布人昵称
     */
    @Excel(name = "发布人昵称")
    private String publisher;

    /**
     * 发布人头像URL
     */
    @Excel(name = "发布人头像URL")
    private String avatar;

    /**
     * 发布人地区（如：北京市朝阳区）
     */
    @Excel(name = "发布人地区", readConverterExp = "如=：北京市朝阳区")
    private String region;

    /**
     * 发布内容
     */
    @Excel(name = "发布内容")
    private String content;

    /**
     * 发布时间（精确到秒）
     */
    @Excel(name = "发布时间", readConverterExp = "精=确到秒")
    private Date publishTime;

    /**
     * 评论数量，默认为0
     */
    @Excel(name = "评论数量，默认为0")
    private Long commentCount;

    /**
     * 点赞数，默认为0
     */
    @Excel(name = "点赞数，默认为0")
    private Long likeCount;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public String getRegion() {
        return region;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getContent() {
        return content;
    }

    public void setPublishTime(Date publishTime) {
        this.publishTime = publishTime;
    }

    public Date getPublishTime() {
        return publishTime;
    }

    public void setCommentCount(Long commentCount) {
        this.commentCount = commentCount;
    }

    public Long getCommentCount() {
        return commentCount;
    }

    public void setLikeCount(Long likeCount) {
        this.likeCount = likeCount;
    }

    public Long getLikeCount() {
        return likeCount;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("publisher", getPublisher())
                .append("avatar", getAvatar())
                .append("region", getRegion())
                .append("content", getContent())
                .append("publishTime", getPublishTime())
                .append("commentCount", getCommentCount())
                .append("likeCount", getLikeCount())
                .toString();
    }
}
